package com.eric.statemachinedemo.strategy.impl;

import com.eric.statemachinedemo.constant.ResponseCodeEnum;
import com.eric.statemachinedemo.constant.RmaStatusEnum;
import com.eric.statemachinedemo.model.request.ProcessRequestData;
import com.eric.statemachinedemo.model.response.ResponseResult;
import com.eric.statemachinedemo.strategy.AbstractRmaProcessStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class FinalTestRmaProcessStrategy extends AbstractRmaProcessStrategy {

    private static final Logger LOGGER = LoggerFactory.getLogger(FinalTestRmaProcessStrategy.class);

    @Override
    public RmaStatusEnum status() {
        return RmaStatusEnum.FINALTEST;
    }

    @Override
    public ResponseResult validate(ProcessRequestData requestData) {
        LOGGER.info("校验从FINALTEST到下一个状态所需要的条件");
        return new ResponseResult(ResponseCodeEnum.SUCCESS);
    }
}
